﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;

using DomainModel.Abstract;
using DomainModel.Concrete;
using DomainModel.Entities;
using WebCore.Attributes;
using WebCore;
using WebCore.Helpers;
using WebCore.Caching;
using System.Text;
using System.Web;
using WebCore.Services;
using System.Collections;

namespace WebCore.Helpers
{
    public class TagHelper : Controller
    {
        public string OutputTags(Event item)
        {
            string tagString = string.Empty;

            // set the url
            string url = Url.GetBaseUrl();
            url += Url.RouteUrl(new { controller = "Event", action = "Details", id = item.EventID, title = Utils.RemoveIllegalCharacters(item.Title, false) });


            foreach (var t in item.TagsList.OfType<Tag>())
            {
                tagString += " " + t.TagName;
            }
            return tagString;
        }
    }
}
